package com.cq.hd.member.service;

import com.cq.hd.member.api.dto.AutoWithdrawalRecordDto;

import java.math.BigDecimal;
import java.util.List;

/**
 * 自动提现记录 service
 */
public interface TbAutoWithdrawalRecordService {

    /**
     * 批量增加自动提现记录
     *
     * @param autoWithdrawalRecords 自动提现记录
     */
    void addRecords(List<AutoWithdrawalRecordDto> autoWithdrawalRecords);

    /**
     * 发起自动提现申请
     */
    void scanAutoWithdrawalAndApply();

    /**
     * 统计商户某个状态下的提现金额
     *
     * @param merchantId 商户id
     * @param state @see com.cq.hd.common.enums.biz.AutoWithdrawalStateEnum
     * @return
     */
    BigDecimal sumWithdrawalAmountByState(Long merchantId, Integer state);

}
